EMT Practice Test

1. Question Content...


Question List

Question1: To transform data from a Kafka topic to another one, I should use

Question2: I am producing Avro data on my Kafka cluster that is integrated with the Confluent Schema Registry. After a schema change that is incompatible, I know my data will be rejected. Which component will reject the data?

Question3: An application is writing AVRO messages using Schema Registry to topic t1. During this process, the Schema Registry becomes unavailable for a few seconds.
What is the expected impact to the application?

Question4: Which configuration is used to determine which directory the connectors are stored in?

Question5: How much should be the heap size of a broker in a production setup on a machine with 256 GB of RAM, in PLAINTEXT mode?

Question6: Producing with a key allows to...

Question7: You are doing complex calculations using a machine learning framework on records fetched from a Kafka topic. It takes more about 6 minutes to process a record batch, and the consumer enters rebalances even though it's still running. How can you improve this scenario?

Question8: A consumer receives a Kafka message that is serialized using an Avro schema. The consumer does not have cache locally mapping between the schema id and the schema.
What does the consumer do?

Question9: What is the protocol used by Kafka clients to securely connect to the Confluent REST Proxy?

Question10: What is the disadvantage of request/response communication?

Question11: You are running a Kafka Streams application in a Docker container managed by Kubernetes, and upon application restart, it takes a long time for the docker container to replicate the state and get back to processing the dat a. How can you improve dramatically the application restart?

Question12: A client connects to a broker in the cluster and sends a fetch request for a partition in a topic. It gets an exception Not Leader For Partition Exception in the response. How does client handle this situation?

Question13: A consumer is configured with enable.auto.commit=false. What happens when close() is called on the consumer object?

Question14: How does a consumer commit offsets in Kafka?

Question15: In the Kafka consumer metrics it is observed that fetch-rate is very high and each fetch is small. What steps will you take to increase throughput?

Question16: In Avro, removing a field that does not have a default is a __ schema evolution

Question17: Your manager would like to have topic availability over consistency. Which setting do you need to change in order to enable that?

Question18: A producer is sending messages with null key to a topic with 6 partitions using the DefaultPartitioner. Where will the messages be stored?

Question19: Which of the following event processing application is stateless? (select two)

Question20: What are stateful operations in Kafka Streams API? (Choose 2.)

Question21: Which of the following is NOT a supported serialization format in ksqlDB?

Question22: What is the default port that the KSQL server listens on?

Question23: Which of these joins does not require input topics to be sharing the same number of partitions?

Question24: To get acknowledgement of writes to only the leader partition, we need to use the config...

Question25: The kafka-console-consumer CLI, when used with the default options

Question26: A Kafka cluster has four brokers with a topic t1 with eight partitions. A client application has just one broker specified in the bootstrap URL.
Brokers:
b1.host.domain.com
b2.host.domain.com
b3.host.domain.com
b4.host.domain.com
Bootstrap URL:
b2.host.domain.com
What would be the impact of such configuration?

Question27: Where are the dynamic configurations for a topic stored?

Question28: What happens if you write the following code in your producer? producer.send(producerRecord).get()

Question29: What Java library is KSQL based on?

Question30: What's is true about Kafka brokers and clients from version 0.10.2 onwards?

Question31: Which type of system best describes Apache Kafka? (Choose 2.)

Question32: What is returned by a producer.send() call in the Java API?

Question33: By default, which replica will be elected as a partition leader? (select two)

Question34: If I produce to a topic that does not exist, and the broker setting auto.create.topic.enable=true, what will happen?

Question35: Which feature determines the maximum parallelism at which a Kafka Streams application can run?

Question36: In Java, Avro SpecificRecords classes are

Question37: The Controller is a broker that is... (select two)

Question38: You are building a system for a retail store to sell products to customers Which dataset should be modeled as a GlobatKTable? (Choose 3.)

Question39: You are using JDBC source connector to copy data from a table to Kafka topic. There is one connector created with max.tasks equal to 2 deployed on a cluster of 3 workers. How many tasks are launched?

Question40: Using the Confluent Schema Registry, where are Avro schema stored?

Question41: You want to send a message of size 3 MB to a topic with default message size configuration. How does KafkaProducer handle large messages?

Question42: Which Kafka CLI should you use to consume from a topic?

Question43: When is the onCompletion() method called?
private class ProducerCallback implements Callback {
@Override
public void onCompletion(RecordMetadata recordMetadata, Exception e) {
if (e != null) {
e.printStackTrace();
}
}
}
ProducerRecord<String, String> record =
new ProducerRecord<>("topic1", "key1", "value1");
producer.send(record, new ProducerCallback());

Question44: Your Kafka cluster has five brokers. The topic t1 on the cluster has two partitions, and it has replication.factor
= 4, min.insync.replicas = 3.
You want to have strong durability guarantees for messages written to topic t1.
If you configure a producer 'acks=all', how many brokers need to acknowledge a message before it is considered committed?

Question45: Which statements are correct about ksqlDB SQL? (Choose 3.)

Question46: Which of the following is not an Avro primitive type?

Question47: In stream processing applications, handling out-of-order data can be a challenge which could affect the implemented business logic.
Which type of Join handles out-of-order records?

Question48: What is the difference between exactly once semantics (EOS) and idempotence?

Question49: What is not a valid authentication mechanism in Kafka?

Question50: while (true) {
ConsumerRecords<String, String> records = consumer.poll(100);
try {
consumer.commitSync();
} catch (CommitFailedException e) {
log.error("commit failed", e)
}
for (ConsumerRecord<String, String> record records)
{
System.out.printf("topic = %s, partition = %s, offset =
%d, customer = %s, country = %s
",
record.topic(), record.partition(),
record.offset(), record.key(), record.value());
}
}
What kind of delivery guarantee this consumer offers?

Question51: If I want to send binary data through the REST proxy, it needs to be base64 encoded. Which component needs to encode the binary data into base 64?

Question52: To allow consumers in a group to resume at the previously committed offset, I need to set the proper value for...

Question53: How will you find out all the partitions where one or more of the replicas for the partition are not in-sync with the leader?

Question54: Which item is not a valid ksqlDB data type?

Question55: The exactly once guarantee in the Kafka Streams is for which flow of data?

Question56: In Kafka Streams, by what value are internal topics prefixed by?

Question57: Kafka is configured with following parameters - log.retention.hours = 168 log.retention.minutes = 168 log.
retention.ms = 168 How long will the messages be retained for?

Question58: An ecommerce website maintains two topics - a high volume "purchase" topic with 5 partitions and low volume "customer" topic with 3 partitions. You would like to do a stream-table join of these topics. How should you proceed?

Question59: You have an existing topic t1 with four partitions.
Which statement is correct about changing the number of partitions for this topic?

Question60: What information isn't stored inside of Zookeeper? (select two)

Question61: When running a ksqlDB for connectors, what does the IF NOT EXISTS clause do?

Question62: Which configuration determines how many bytes of data are collected before sending messages to the Kafka broker?

Question63: In Avro, removing or adding a field that has a default is a __ schema evolution

Question64: A Zookeeper configuration has tickTime of 2000, initLimit of 20 and syncLimit of 5. What's the timeout value for followers to connect to Zookeeper?

Question65: A Zookeeper ensemble contains 5 servers. What is the maximum number of servers that can go missing and the ensemble still run?

Question66: You have a topic t1 in a Kafka cluster. A producer running on host A can successfully write messages to t1.
Then, you move that producer code to run on host B, but it fails writing messages to t1.
What is a likely reason for that failure?

Question67: Which configurations define which connector is deployed?

Question68: How can you gracefully make a Kafka consumer to stop immediately polling data from Kafka and gracefully shut down a consumer application?

Question69: In Kafka, what are Topics split into?

Question70: What is encoding and decoding of a message also known as?

Question71: What is true about partitions? (select two)

Question72: ksqIDB Lambda functions must be used inside what type of designated functions?

Question73: To enhance compression, I can increase the chances of batching by using

Question74: A topic receives all the orders for the products that are available on a commerce site. Two applications want to process all the messages independently - order fulfilment and monitoring. The topic has 4 partitions, how would you organise the consumers for optimal performance and resource usage?

Question75: What is a generic unique id that I can use for messages I receive from a consumer?

Question76: What happens when broker.rack configuration is provided in broker configuration in Kafka cluster?

Question77: You are building a consumer application that processes events from a Kafka topic. What is the most important metric to monitor to ensure real-time processing?

Question78: To read data from a topic, the following configuration is needed for the consumers

Question79: You are experiencing low throughput from a Java producer. You monitor the Kafka metrics and notice that the metrics for that producer show low I/O thread ratio and low I/O thread wait ratio.
What is most likely the cause of the slow producer performance?

Question80: A consumer wants to read messages from partitions 0 and 1 of a topic topic1. Code snippet is shown below.
consumer.subscribe(Arrays.asList("topic1"));
List<TopicPartition> pc = new ArrayList<>();
pc.add(new PartitionTopic("topic1", 0));
pc.add(new PartitionTopic("topic1", 1));
consumer.assign(pc);

Question81: There are 3 producers writing to a topic with 5 partitions. There are 10 consumers consuming from the topic as part of the same group. How many consumers will remain idle?

Question82: You are working on an Orders microservice Thai is publishing messages lo an Orders topic. II is a business requirement that the Orders for a given customer are processed sequentially. Also, the Orders topic is partitioned tor scalability.
Which factors would you need to address during application development?